#!/bin/bash
python 1.py \
    --input /mnt/sfs/asr/wsy_data/hlt-lab/sd-qa/aus-00000-of-00001.parquet \
    --output /mnt/sfs/asr/code/zy/osum_xlgeng_zy/voicebench/data/sd-qa.jsonl \
    --audio_dir /mnt/sfs/asr/wsy_data/hlt-lab/audio/sd-qa \

tests="law engineering other biology business economics health philosophy psychology history chemistry physics"
for test in $tests; do
    echo "Testing test: $test"
    python 1.py \
        --input /mnt/sfs/asr/wsy_data/hlt-lab/mmsu/$test-00000-of-00001.parquet \
        --output /mnt/sfs/asr/code/zy/osum_xlgeng_zy/voicebench/data/mmsu_$test.jsonl \
        --audio_dir /mnt/sfs/asr/wsy_data/hlt-lab/audio/mmsu_$test \
        
done


# datasets=("commoneval" "openbookqa" "ifeval" "advbench")
# OUTPUT_DIR="/mnt/sfs/asr/code/zy/osum_xlgeng_zy/voicebench/data"
# AUDIO_DIR="/mnt/sfs/asr/wsy_data/hlt-lab/audio"
# LOG_FILE="${OUTPUT_DIR}/process.log"

# # 创建输出目录
# mkdir -p "${OUTPUT_DIR}"
# mkdir -p "${AUDIO_DIR}"

# # 记录开始时间
# echo "开始处理数据: $(date)" | tee -a "${LOG_FILE}"

# # 依次处理每个数据集
# for dataset in "${datasets[@]}"; do
#     echo "正在处理数据集: ${dataset}" | tee -a "${LOG_FILE}"
#     INPUT_DIR="/mnt/sfs/asr/wsy_data/hlt-lab/${dataset}"
#     # 查找当前数据集的parquet文件
#     find "${INPUT_DIR}" -type f -name "*.parquet" | while read -r parquet_file; do
#         # 生成输出文件名
#         output_jsonl="${OUTPUT_DIR}/${dataset}.jsonl"
        
#         echo "正在处理文件: ${parquet_file}" | tee -a "${LOG_FILE}"
        
#         # 运行Python脚本处理单个parquet文件
#         python 1.py \
#             --input "${parquet_file}" \
#             --output "${output_jsonl}" \
#             --audio_dir "${AUDIO_DIR}/${dataset}" 2>&1 | tee -a "${LOG_FILE}"
        
#         # 检查处理结果
#         if [ $? -eq 0 ]; then
#             echo "成功处理: ${parquet_file}" | tee -a "${LOG_FILE}"
#         else
#             echo "处理失败: ${parquet_file}" | tee -a "${LOG_FILE}"
#         fi
#     done
# done

# # 记录结束时间
# echo "数据处理完成: $(date)" | tee -a "${LOG_FILE}"
# echo "输出目录: ${OUTPUT_DIR}" | tee -a "${LOG_FILE}"